package com.cheers.common;

public class ResultListModel extends ResultModel {

	private static final long serialVersionUID = 1L;

	// 操作编码
	private String code;
	// 操作编码说明
	private String desc;
	// 操作结果
	private Object result;
	// 当前分页数
	private String pageIndex;
	// 每页记录数
	private int pageSize;
	// 记录结果总数
	private int total;

	public ResultListModel() {
	}
	
	/**
	 * 默认成功构造器
	 * 
	 * @param result
	 * @param pageIndex
	 * @param pageSize
	 * @param total
	 */
	public ResultListModel(Object result, String pageIndex, int pageSize,
			int total) {
		this.code = Constants.OK;
		this.desc = Constants.OK_DESC;
		this.result = result;
		this.pageIndex = pageIndex;
		this.pageSize = pageSize;
		this.total = total;
	}

	/**
	 * 自定义构造器
	 * 
	 * @param code
	 * @param desc
	 * @param result
	 * @param pageIndex
	 * @param pageSize
	 * @param total
	 */
	public ResultListModel(String code, String desc, Object result,
			String pageIndex, int pageSize, int total) {
		this.code = code;
		this.desc = desc;
		this.result = result;
		this.pageIndex = pageIndex;
		this.pageSize = pageSize;
		this.total = total;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Object getResult() {
		return result;
	}

	public void setResult(Object result) {
		this.result = result;
	}

	public String getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(String pageIndex) {
		this.pageIndex = pageIndex;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

}
